Subscription to directory data

Here is a subscription definition example based on directory data.

<subscription field-id="UserField" name="onChange" prop-id="" subscription-class="com.axemble.vdp.mapping.extensions.DirectoryBrowserMappingExtension"> 
        <action field-id="Field_1" prop-id="" throw-events="false" update-mode="both" action-key="Organization.Name"/> 
        <action field-id="Field_2" prop-id="" throw-events="false" update-mode="both" action-key="PhoneNumber"/>
        <action field-id="Field_3" prop-id="" throw-events="false" update-mode="both" action-key="Email"/>
</subscription> 
 

On the « UserField » field modification, the fields « Field_1, Field_2, Field_3 » are allocated and take as respective values: the affiliated organization name, the phone number, and the user e-mail.

subscription

The "subscription" element defines the subscription input. Used in the resource template XML.

Element Description Where to find more information?
field-id modified document field and trigger of the "onChange" event. This field must be of Directory type.
name Name of occurred event
prop-id Not available
subscription-class Extension class: “com.axemble.vdp.mapping.extensions.directoryBrowserMappingExtension”

action

The "action" element defines the input of an action to be performed after an event is triggered. Used in XML of the resource template

Element Description Where to find more information?
field-id System name of the subscribed field
prop-id Not available
throw-events
update-mode
action-key Property of the DirectoryElement that we want to retrieve

on-stage

The "on-stage" element defines the input of a step on which the subscription will be run.

Element Description Where to find more information?
name System name of the concerned step The keyword « sys_CreationWizard » enables to indicate that the treatment will be processed only on the action of process document creation.

The actions

Actions define all the document fields that will be updated when subscription is run. Actions can only be defined at the XML document level of the resource template. It is possible to define 1 to n actions.

The filters

Filters on steps can be placed to restrict subscriptions running on some steps. If no step has been specified, the subscription will be valid at all steps of the document. Filters are defined at the XML document level of the resource template. The on-stage tags can be present from 0 to n times.

Introspection

Introspection will let you access the object's intrinsic properties. These properties should be accessible through the "get" type methods on directory objects. Introspection is possible at the "action-key" attribute level of the "action" tag.

Functions

Functions will let you access the extended attribute values in directory fields.

Function Concerned classes Description
@getOrganizationAttribute(field_name) Directory organization Is applicable to an Organization type document field.
@getLocalizationAttribute(field_name) Directory localization Is applicable to a Localization type document field.
@getUserAttribute(field_name) Directory user Is applicable to a User type document field.
@toDirectoryElement(field_name) User, Group, Organization Is applicable to a DirectoryElement type document field.
@toDirectoryElement(method_name) Method recovering to a User,Group,Organization,Localization type directory object. Enables, via the User object introspection, to recover its localization, then to convert it in DirectoryElement in order to store it.